package com.holly.unit.genx.sqladapter.table;

import com.holly.unit.db.api.sqladapter.AbstractSql;

/**
 * 类描述: 获取所有表的sql
 *
 * @author fxr
 * @version 1.0.0
 * @date 2022/1/14 20:06
 */
public class TableListExtSql extends AbstractSql {
    @Override
    protected String mysql() {
        return "select TABLE_NAME as table_name, from information_schema.`TABLES` where TABLE_SCHEMA = {0}";
    }

    @Override
    protected String sqlServer() {
        return "select distinct c.name as  table_name from sys.objects c where c.type = 'U' ";
    }

    @Override
    protected String pgSql() {
        return "select tablename from pg_tables where schemaname='public'";
    }

    @Override
    protected String oracle() {
        return " select distinct colstable.table_name as  table_name from user_tab_cols colstable order by colstable.table_name";
    }
}
